﻿import * as React from "react";
import * as ReactDOM from "react-dom";
import { createStore } from 'redux'
import { connect } from 'react-redux'
import * as electron   from 'electron'

import * as Css from '../../工具代码/Css加载'
Css.加载(module.filename)

import R登录表单 from '../../组件代码/容器组件/登录表单'

let ipcR = electron.ipcRenderer

class R标题栏 extends React.Component<any, any> {
    constructor(props) {
        super(props)
    }
    render() {
        return (
            <div className="标题栏">
                <span id="标题" className="标题">电讯 atwxa.com</span>

                <span id="托盘按钮"  className="按钮 托盘 小" onClick={() => {

                    ipcR.send('托盘窗口')

                } }><i className="iconfont icon-arrowbottom"></i></span>

                <span id="关闭按钮" className="按钮 警告 小" onClick={() => {

                    ipcR.send('关闭窗口')

                } }><i className="iconfont icon-guanbi"></i></span>
            </div>
        )
    }
}

class R登录主窗体 extends React.Component<any, any> {
    constructor(props) {
        super(props)
    }
    render() {
        return (
            <div className="切换按钮组">
                <div id="扫码登录" data-xuanze='假' className="按钮 默认 组" onClick= {() => {

                } }>扫码登录</div>
                <div id="登录" data-xuanze='真' className="按钮 默认 组" onClick={() => {

                } }>密码登录</div>
                <div id="验证登录" data-xuanze='假' className="按钮 默认 组" onClick={() => {

                } }>验证登录</div>
            </div>
        )
    }
}

class R登录页面 extends React.Component<any, any> {
    constructor(props) {
        super(props)
    }
    render() {
        return (
            <div>
                <R标题栏/>
                <R登录表单/>
                <R登录主窗体/>
            </div>
        )
    }
}

ReactDOM.render(
    <R登录页面 />,
    document.getElementById("容器")
)
